package com.example.rwq_test.designParttern.multiThread.threadSpecificStorage;

import java.util.concurrent.TimeUnit;

/**
 * 调用打印和关闭的线程
 *
 * @author renweiqiang
 * @version 1.0.0
 * @createTime 2022/11/19
 */
public class ClientThread extends Thread {
    public ClientThread(String name) {
        super(name);
    }

    public void run() {
        System.out.println(getName() + " BEGIN");
        for (int i = 0; i < 10; i++) {
            Log.printIn("i = " + i);
            try {
                TimeUnit.MILLISECONDS.sleep(100);
            } catch (InterruptedException e) {

            }
        }
        Log.close();
        System.out.println(getName() + " END");
    }
}
